${model3d}

uniform mat4 ece_LocalSkeletonMatrix[MaxSkeletonCount];
uniform mat4 ece_NormalSkeletonMatrix[MaxSkeletonCount];
uniform ece_ShadowMapping shadow;
uniform vec3 viewPosition;
attribute vec4 ece_Vertex;
attribute vec4 ece_BoneIds;
attribute vec4 ece_Weights;
attribute vec2 ece_TexCoord;
attribute vec3 ece_Normal;
varying vec2 vTexCoord;
varying vec3 vNormal;
varying vec4 vShadowCoord; 
varying vec3 vPosition;
varying float vDistance;
void main() {
	vec3 normal = vec3(0.0);
	vec4 vertex = vec4(0.0);
	
	model3dTransform(
		ece_LocalSkeletonMatrix, 
		ece_NormalSkeletonMatrix,
		ece_Weights, ece_BoneIds, 
		ece_Vertex, ece_Normal, 
		vertex, normal); 
	
	gl_Position = ece_ModelViewProjectionMatrix * vertex;
	if(shadow.enable) {
		vShadowCoord = shadow.shadowMatrix * ece_ModelViewMatrix * vertex;
	}
	vPosition = vec3(ece_ModelViewMatrix * vertex);
	vDistance = length(gl_Position.xyz);
	
	vTexCoord = ece_TexCoord;
	vNormal = ece_NormalMatrix * normal;
}